import request from "@/utils/request";

/**
 * 获取素材列表
 * @param params
 * @returns
 */
export function getresourceList(data) {
  return request({
    url: '/management/resource.resource/getList',
    method: 'post',
    data
  })
}

/**
 * 添加素材
 * @param params
 * @returns
 */
export function addresource(data) {
  return request({
    url: '/management/resource.resource/add',
    method: 'post',
    data
  })
}

/**
 * 修改素材
 * @param params
 * @returns
 */
export function updateresource(data) {
  return request({
    url: '/management/resource.resource/update',
    method: 'post',
    data
  })
}

/**
 * 审核素材
 * @param params
 * @returns
 */
export function auditResresource(data) {
  return request({
    url: '/management/resource.resource/auditRes',
    method: 'post',
    data
  })
}

/**
 * 删除素材
 * @param params
 * @returns
 */
export function delresource(data) {
  return request({
    url: '/management/resource.resource/del',
    method: 'post',
    data
  })
}

/**
 * 获取广告列表
 * @param params
 * @returns
 */
export function getpushList(data) {
  return request({
    url: '/management/advertisement.advertisement_push/getList',
    method: 'post',
    data
  })
}

/**
 * 推送广告
 * @param params
 * @returns
 */
export function addpush(data) {
  return request({
    url: '/management/advertisement.advertisement_push/add',
    method: 'post',
    data
  })
}

/**
 * 修改推送广告
 * @param params
 * @returns
 */
export function updatepush(data) {
  return request({
    url: '/management/advertisement.advertisement_push/update',
    method: 'post',
    data
  })
}

/**
 * 上下架推送广告
 * @param params
 * @returns
 */
export function upDownpush(data) {
  return request({
    url: '/management/advertisement.advertisement_push/upDown',
    method: 'post',
    data
  })
}

/**
 * 删除推送广告
 * @param params
 * @returns
 */
export function delpush(data) {
  return request({
    url: '/management/advertisement.advertisement_push/del',
    method: 'post',
    data
  })
}

/**
 * 触发广告更新
 * @param params
 * @returns
 */
export function triggerUpdateAD(data) {
  return request({
    url: '/management/advertisement.advertisement_push/triggerUpdateAD',
    method: 'post',
    data
  })
}

/**
 * 获取广告分组统计列表
 * @param params
 * @returns
 */
export function getGroupList(data) {
  return request({
    url: '/management/advertisement.advertisement_push/getGroupList',
    method: 'post',
    data
  })
}

/**
 * 查询广告播放历史记录列表
 * @param params
 * @returns
 */
export function getRecordList(data) {
  return request({
    url: '/management/advertisement.advertisementRecord/getList',
    method: 'post',
    data
  })
}